extends PanelContainer

@onready var 背景 = %"背景"
@onready var audio_stream_player = $AudioStreamPlayer

signal 按钮被点击(index)

func _ready():
	背景.hide()

func _on_gui_input(event):
	if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
		按钮被点击.emit(get_index())

func _on_mouse_entered():
	背景.show()
	背景.self_modulate=Color.BURLYWOOD
	audio_stream_player.play()

func _on_mouse_exited():
	背景.hide()
	背景.self_modulate=Color.WHITE
